const {Schema, model } = require('mongoose');
const moment = require('moment');

// 设置数据集合的结构
const claimSchema = new Schema({

      orderId: {
            type: Schema.Types.ObjectId,  // mongoose 中 _id 属性的类型
            ref: 'Order'  // 指定关联集合的模型名称
      },
      productId: {
            type: Schema.Types.ObjectId,
            ref: 'Product'
      },
      customerId: {
            type: Schema.Types.ObjectId,
            ref: 'Customer'
      },
}, { versionKey: false});

const Claim = model('Claim', claimSchema, "claims");

module.exports.Claim =Claim